﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="WebShop_Project.test" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ListView ID="ListView1" runat="server" DataSourceID="ObjectDataSource1">
        <AlternatingItemTemplate>
            <tr style="background-color: #FAFAD2;color: #284775;">
                <td>
                    <asp:Label ID="ArticleIDLabel" runat="server" Text='<%# Eval("ArticleID") %>' />
                </td>
                <td>
                    <asp:Label ID="ArticleNameLabel" runat="server" Text='<%# Eval("ArticleName") %>' />
                </td>
                <td>
                    <asp:Label ID="CategoryIDLabel" runat="server" Text='<%# Eval("CategoryID") %>' />
                </td>
                <td>
                    <asp:Label ID="UnitPriceLabel" runat="server" Text='<%# Eval("UnitPrice") %>' />
                </td>
                <td>
                    <asp:CheckBox ID="ActiveArticleCheckBox" runat="server" Checked='<%# Eval("ActiveArticle") %>' Enabled="false" />
                </td>
                <td>
                    <asp:Label ID="ArticleImagePathLabel" runat="server" Text='<%# Eval("ArticleImagePath") %>' />
                </td>
            </tr>
        </AlternatingItemTemplate>
        <EditItemTemplate>
            <tr style="background-color: #FFCC66;color: #000080;">
                <td>
                    <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update" />
                    <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" />
                </td>
                <td>
                    <asp:TextBox ID="ArticleIDTextBox" runat="server" Text='<%# Bind("ArticleID") %>' />
                </td>
                <td>
                    <asp:TextBox ID="ArticleNameTextBox" runat="server" Text='<%# Bind("ArticleName") %>' />
                </td>
                <td>
                    <asp:TextBox ID="CategoryIDTextBox" runat="server" Text='<%# Bind("CategoryID") %>' />
                </td>
                <td>
                    <asp:TextBox ID="UnitPriceTextBox" runat="server" Text='<%# Bind("UnitPrice") %>' />
                </td>
                <td>
                    <asp:CheckBox ID="ActiveArticleCheckBox" runat="server" Checked='<%# Bind("ActiveArticle") %>' />
                </td>
                <td>
                    <asp:TextBox ID="ArticleImagePathTextBox" runat="server" Text='<%# Bind("ArticleImagePath") %>' />
                </td>
            </tr>
        </EditItemTemplate>
        <EmptyDataTemplate>
            <table runat="server" style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;">
                <tr>
                    <td>No data was returned.</td>
                </tr>
            </table>
        </EmptyDataTemplate>
        <InsertItemTemplate>
            <tr style="">
                <td>
                    <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" />
                    <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" />
                </td>
                <td>
                    <asp:TextBox ID="ArticleIDTextBox" runat="server" Text='<%# Bind("ArticleID") %>' />
                </td>
                <td>
                    <asp:TextBox ID="ArticleNameTextBox" runat="server" Text='<%# Bind("ArticleName") %>' />
                </td>
                <td>
                    <asp:TextBox ID="CategoryIDTextBox" runat="server" Text='<%# Bind("CategoryID") %>' />
                </td>
                <td>
                    <asp:TextBox ID="UnitPriceTextBox" runat="server" Text='<%# Bind("UnitPrice") %>' />
                </td>
                <td>
                    <asp:CheckBox ID="ActiveArticleCheckBox" runat="server" Checked='<%# Bind("ActiveArticle") %>' />
                </td>
                <td>
                    <asp:TextBox ID="ArticleImagePathTextBox" runat="server" Text='<%# Bind("ArticleImagePath") %>' />
                </td>
            </tr>
        </InsertItemTemplate>
        <ItemTemplate>
            <tr style="background-color: #FFFBD6;color: #333333;">
                <td>
                    <asp:Label ID="ArticleIDLabel" runat="server" Text='<%# Eval("ArticleID") %>' />
                </td>
                <td>
                    <asp:Label ID="ArticleNameLabel" runat="server" Text='<%# Eval("ArticleName") %>' />
                </td>
                <td>
                    <asp:Label ID="CategoryIDLabel" runat="server" Text='<%# Eval("CategoryID") %>' />
                </td>
                <td>
                    <asp:Label ID="UnitPriceLabel" runat="server" Text='<%# Eval("UnitPrice") %>' />
                </td>
                <td>
                    <asp:CheckBox ID="ActiveArticleCheckBox" runat="server" Checked='<%# Eval("ActiveArticle") %>' Enabled="false" />
                </td>
                <td>
                    <asp:Label ID="ArticleImagePathLabel" runat="server" Text='<%# Eval("ArticleImagePath") %>' />
                </td>
            </tr>
        </ItemTemplate>
        <LayoutTemplate>
            <table runat="server">
                <tr runat="server">
                    <td runat="server">
                        <table id="itemPlaceholderContainer" runat="server" border="1" style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;font-family: Verdana, Arial, Helvetica, sans-serif;">
                            <tr runat="server" style="background-color: #FFFBD6;color: #333333;">
                                <th runat="server">ArticleID</th>
                                <th runat="server">ArticleName</th>
                                <th runat="server">CategoryID</th>
                                <th runat="server">UnitPrice</th>
                                <th runat="server">ActiveArticle</th>
                                <th runat="server">ArticleImagePath</th>
                            </tr>
                            <tr id="itemPlaceholder" runat="server">
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr runat="server">
                    <td runat="server" style="text-align: center;background-color: #FFCC66;font-family: Verdana, Arial, Helvetica, sans-serif;color: #333333;"></td>
                </tr>
            </table>
        </LayoutTemplate>
        <SelectedItemTemplate>
            <tr style="background-color: #FFCC66;font-weight: bold;color: #000080;">
                <td>
                    <asp:Label ID="ArticleIDLabel" runat="server" Text='<%# Eval("ArticleID") %>' />
                </td>
                <td>
                    <asp:Label ID="ArticleNameLabel" runat="server" Text='<%# Eval("ArticleName") %>' />
                </td>
                <td>
                    <asp:Label ID="CategoryIDLabel" runat="server" Text='<%# Eval("CategoryID") %>' />
                </td>
                <td>
                    <asp:Label ID="UnitPriceLabel" runat="server" Text='<%# Eval("UnitPrice") %>' />
                </td>
                <td>
                    <asp:CheckBox ID="ActiveArticleCheckBox" runat="server" Checked='<%# Eval("ActiveArticle") %>' Enabled="false" />
                </td>
                <td>
                    <asp:Label ID="ArticleImagePathLabel" runat="server" Text='<%# Eval("ArticleImagePath") %>' />
                </td>
            </tr>
        </SelectedItemTemplate>
    </asp:ListView>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetArticles" TypeName="WebShopData.Articles"></asp:ObjectDataSource>
    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
    <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
</asp:Content>
